package com.spring.cloud.examples.controller;


import com.spring.cloud.examples.service.Service1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/service1")
public class Service1Controller {

    @Autowired
    private Service1 service1;

    @RequestMapping(value = "/insert",method = RequestMethod.POST)
    @ResponseBody
    public String insertService1()
    {
        service1.insertService1();
        return "测试全局事务";
    }
}
